package blog.com.mw.base;

import java.util.Map;

import lombok.Getter;
import lombok.Setter;

public class ResultData{
	@Setter
	@Getter
	private Map<String,Object> data;
	@Setter
	@Getter
	private String code;
	@Setter
	@Getter
	private String msg;
	@Setter
	@Getter
	private String state;
	
	public static ResultData getOk() {
		ResultData rs = new ResultData();
		rs.setCode("200");
		rs.setState("success");
		return rs;
	}
	
	public static ResultData getFail() {
		ResultData rs = new ResultData();
		rs.setCode("100");
		rs.setState("fail");
		return rs;
	}

	@Override
	public String toString() {
		return "ResultData [data=" + data + ", code=" + code + ", msg=" + msg + ", state=" + state + "]";
	}
}
